package com.atguigu.edu.publisher.mapper;

import com.atguigu.edu.publisher.beans.TradeFullOrderAmount;
import com.atguigu.edu.publisher.beans.TradeProvinceOrderAmount;
import org.apache.flink.api.java.tuple.Tuple3;
import org.apache.ibatis.annotations.Select;


import java.util.List;

public interface TradeStatsMapper {
//获取某天某个省份交易总额
    @Select("select province_name,sum(order_count) order_count,sum(user_count) user_count,sum(order_amount) order_amount  from dws_trade_province_order_window where toYYYYMMDD(stt)=#{date} group by province_name")
   List<TradeProvinceOrderAmount>selectProvinceAmount (Integer date);
//总交易额
    @Select("select sum(order_count)order_count,sum(user_count),sum(order_amount)order_amount from dws_trade_full_order_window  where  toYYYYMMDD(stt)=#{date}")
/*    Tuple3<String,String,String> selectFullOrderAmount(Integer date);*/
 TradeFullOrderAmount selectFullOrderAmount(Integer date);

}
